package com.itheima.homework;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;

public class demo02 {
    public static void main(String[] args) throws Exception {
        FileInputStream fis = new FileInputStream("D:/img1/a.png");
        FileOutputStream fos = new FileOutputStream("D:/img2/b.png");

        int len;
        byte[] bytes = new byte[1024];
        while((len = fis.read(bytes))!= -1)
            fos.write(bytes,0,len);
        fis.close();
        fos.close();
    }
}
